package com.zsrt.java.day20161229.lh.day.demo06.user.entity;
/**
 * 看初始化的默认类型
 * 
 *  UserEntity username password
 *  
 *  boolean girlFrind;
 *  long    seconds;
 *  int     age;
 *  double  money;
 *  char   sex;

 * @author My
 *
 */
public class UserEntity {
	
	
	/**
	 * 动态的方法必须在对象上调用
	 * 
	 * 通过用户名和密码判断是否可以正常登陆
	 * @param username  用户名
	 * @param password	密码
	 * @return  是否登陆成功
	 * 
	 * 
	 */
	public boolean login(String username, String password){
		
		// 标准 szrt@163.com qq123456
		
		if("szrt@163.com".equals(username) && "qq123456".equals(passwrd)){
			System.out.println("登陆成功");
			return true;
		}
		System.out.println("登陆成功");
		
		return false;
		
	}
	
	
	

	public static void main(String[] args) {

		UserEntity lh=new UserEntity();
		/*lh.setUsername("刘浩");
		lh.setPasswrd("11");
		lh.setAge(23);
		lh.setGrilFrind(true);
		lh.setSex('男');
		lh.setMoney(1.1);
		lh.setSeconds(23);*/
		
		System.out.println(lh.getUsername());
		System.out.println(lh.getPasswrd());
		System.out.println(lh.getAge());
		System.out.println(lh.getSex());
		System.out.println(lh.getMoney());
		System.out.println(lh.getSeconds());
		//boolean  isxx();
		System.out.println(lh.isGrilFrind());
		
	}
	
	
	public UserEntity(){}
	private String username;
	private String passwrd; 
	private boolean grilFrind;
	private long seconds;
	private int age;
	private double money;
	private char sex;
	
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPasswrd() {
		return passwrd;
	}
	public void setPasswrd(String passwrd) {
		this.passwrd = passwrd;
	}
	public boolean isGrilFrind() {
		return grilFrind;
	}
	public void setGrilFrind(boolean grilFrind) {
		this.grilFrind = grilFrind;
	}
	public long getSeconds() {
		return seconds;
	}
	public void setSeconds(long seconds) {
		this.seconds = seconds;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public double getMoney() {
		return money;
	}
	public void setMoney(double money) {
		this.money = money;
	}
	public char getSex() {
		return sex;
	}
	public void setSex(char sex) {
		this.sex = sex;
	}
	
	
	

}
